package com.wissen.singleton;
/**
 * 
 * @author wissen16
 * @param pname  President name 
 */
public class President extends Election{
	String pname;
	static boolean flag=false;
	SingletonException ex=new SingletonException();
	/**
	 * create President
	 */
	President(){
		if(flag==false){
			pname=super.get_voted();
			flag=true;
			}
		else
			System.out.println(ex.getMessage());		
	}
	/**
	 * create President by Using Provided name
	 */
	President(String str){
		if(flag==false){
			pname=super.get_voted(str);
			flag=true;
			}
		else
			System.out.println(ex.getMessage());
	}
}

